package binary;
//二进制演示
public class BinaryDemo {
    public static void main(String[] args) {
        int a=45;
        String s=Integer.toBinaryString(a);//将十进制转换为二进制
        System.out.println(s);//101101

        a= 100;
        String s1 = Integer.toBinaryString(a);
        System.out.println(s1);
        String s2 = Integer.toHexString(a);
        System.out.println(s2);






    }
}
